<!DOCTYPE html><html lang="zh-Hans"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"><meta name="description" content="js promise复习"><meta name="keywords" content="js promise prototype"><meta name="author" content="晟松"><meta name="copyright" content="晟松"><title>js promise复习 | 晟松</title><link rel="shortcut icon" href="/logo.png"><link rel="stylesheet" href="/css/index.css?version=1.9.0"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@latest/css/font-awesome.min.css?version=1.9.0"><meta name="format-detection" content="telephone=no"><meta http-equiv="x-dns-prefetch-control" content="on"><link rel="dns-prefetch" href="https://cdn.jsdelivr.net"><link rel="dns-prefetch" href="https://hm.baidu.com"><script>var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?c34d81d53341febe06a155941e2df16d";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();</script><meta http-equiv="Cache-Control" content="no-transform"><meta http-equiv="Cache-Control" content="no-siteapp"><script>var GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容:${query}"}},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  hexoVersion: '5.4.0'
} </script><meta name="generator" content="Hexo 5.4.0"></head><body><i class="fa fa-arrow-right" id="toggle-sidebar" aria-hidden="true"></i><div id="sidebar" data-display="true"><div class="toggle-sidebar-info text-center"><span data-toggle="切换文章详情">切换站点概览</span><hr></div><div class="sidebar-toc"><div class="sidebar-toc__title">目录</div><div class="sidebar-toc__progress"><span class="progress-notice">你已经读了</span><span class="progress-num">0</span><span class="progress-percentage">%</span><div class="sidebar-toc__progress-bar"></div></div><div class="sidebar-toc__content"><ol class="toc"><li class="toc-item toc-level-5"><a class="toc-link" href="#1-js%E7%BB%84%E6%88%90"><span class="toc-number">1.</span> <span class="toc-text">1.js组成</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#2-%E8%AE%B0%E5%BD%95%E4%B8%80%E4%BA%9B%E5%B8%B8%E7%94%A8%E7%9A%84%E6%96%B9%E6%B3%95"><span class="toc-number">2.</span> <span class="toc-text">2.记录一些常用的方法</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#3-js-promise"><span class="toc-number">3.</span> <span class="toc-text">3.js promise</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#4-DOM%E6%96%87%E6%A1%A3%E5%AF%B9%E8%B1%A1%E6%A8%A1%E5%9E%8B"><span class="toc-number">4.</span> <span class="toc-text">4.DOM文档对象模型</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#5-BOM%E6%B5%8F%E8%A7%88%E5%99%A8%E5%AF%B9%E8%B1%A1%E6%A8%A1%E5%9E%8B"><span class="toc-number">5.</span> <span class="toc-text">5.BOM浏览器对象模型</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#6-this"><span class="toc-number">6.</span> <span class="toc-text">6.this</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#7-%E5%8E%9F%E5%9E%8B%E5%AF%B9%E8%B1%A1-%E5%8E%9F%E5%9E%8B%E9%93%BE"><span class="toc-number">7.</span> <span class="toc-text">7.原型对象(原型链)</span></a><ol class="toc-child"><li class="toc-item toc-level-6"><a class="toc-link" href="#%E6%A6%82%E5%BF%B5"><span class="toc-number">7.1.</span> <span class="toc-text">概念</span></a></li><li class="toc-item toc-level-6"><a class="toc-link" href="#%E5%8E%9F%E5%9E%8B%E9%93%BE"><span class="toc-number">7.2.</span> <span class="toc-text">原型链</span></a></li></ol></li></ol></div></div><div class="author-info hide"><div class="author-info__avatar text-center"><img src="/img/avatar.png"></div><div class="author-info__name text-center">晟松</div><div class="author-info__description text-center">晟松的博客</div><div class="follow-button"><a target="_blank" rel="noopener" href="https://gitee.com/cheng_song">Gitee</a></div><hr><div class="author-info-articles"><a class="author-info-articles__archives article-meta" href="/archives"><span class="pull-left">文章</span><span class="pull-right">52</span></a><a class="author-info-articles__tags article-meta" href="/tags"><span class="pull-left">标签</span><span class="pull-right">45</span></a></div></div></div><div id="content-outer"><div id="top-container" style="background-image: url(/img/blog-bg.jpg)"><div id="page-header"><span class="pull-left"> <a id="site-name" href="/">晟松</a></span><i class="fa fa-bars toggle-menu pull-right" aria-hidden="true"></i><span class="pull-right menus">   <a class="site-page" href="/">Home</a><a class="site-page" href="/archives">Archives</a><a class="site-page" href="/tags">Tags</a><a class="site-page" href="/categories">Categories</a></span><span class="pull-right"><a class="site-page social-icon search"><i class="fa fa-search"></i><span> 搜索</span></a></span></div><div id="post-info"><div id="post-title">js promise复习</div><div id="post-meta"><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2020-08-25</time><div class="post-meta-wordcount"><span>字数总计: </span><span class="word-count">2.3k</span><span class="post-meta__separator">|</span><span>阅读时长: 7 分钟</span></div></div></div></div><div class="layout" id="content-inner"><article id="post"><div class="article-container" id="post-content"><p> 之前对js只是在菜鸟上面简单的看了一遍，并没有进行一个熟练地使用，后面发现需要补一些基础原理方面的，特在这里对前面的js进行一个复习</p>
<h5 id="1-js组成"><a href="#1-js组成" class="headerlink" title="1.js组成"></a>1.js组成</h5><blockquote>
<p><strong>js = ECMAScript + DOM + BOM + 高级</strong></p>
</blockquote>
<p><strong>ECMAScript</strong>（前身为欧洲计算机制造商协会）：JavaScript的语法规范</p>
<p><strong>DOM</strong>（Document Object Model 的文档对象模型简称）：JavaScript操作网页上元素的API</p>
<p><strong>BOM</strong>（Browser Object Model 的浏览器对象模型简称）：JavaScript操作浏览器部分功能的API</p>
<h5 id="2-记录一些常用的方法"><a href="#2-记录一些常用的方法" class="headerlink" title="2.记录一些常用的方法"></a>2.记录一些常用的方法</h5><p>字符串：</p>
<table>
<thead>
<tr>
<th>名</th>
<th></th>
</tr>
</thead>
<tbody><tr>
<td>trim()</td>
<td>去除字符串的左右空格，不包括在中间的空格</td>
</tr>
<tr>
<td>indexOf()</td>
<td>返回一个字符在字符串的位置</td>
</tr>
<tr>
<td>split()</td>
<td>把字符串分割成字符串数组</td>
</tr>
<tr>
<td>slice()</td>
<td>得到一个字符串的一部分</td>
</tr>
</tbody></table>
<p>json：</p>
<table>
<thead>
<tr>
<th>名</th>
<th></th>
</tr>
</thead>
<tbody><tr>
<td>JSON.parse(json name)</td>
<td>json<strong>字符串</strong>转成js对象  //json格式是一个字符串</td>
</tr>
<tr>
<td>JSON.stringify(object name)</td>
<td>js值(对象或数组)转成json字符串</td>
</tr>
</tbody></table>
<p>算了，用的时候还不如直接查参考手册</p>
<h5 id="3-js-promise"><a href="#3-js-promise" class="headerlink" title="3.js promise"></a>3.js promise</h5><p>之前一直听说promise，但不知道是何，现在才来进行一个理解。</p>
<p>promise是es6新增的一个类，专门为了简单化异步编程而进行。避免了层层的回调函数，将回调函数转换成一条执行链。</p>
<p>Promise 构造函数只有一个参数，是一个函数，这个函数在构造之后会直接被异步运行，所以我们称之为起始函数。起始函数包含两个参数 <strong>resolve 和 reject</strong>。resolve表示函数正常运行，reject表示出现错误时运行</p>
<p><strong>在初始化Promise实例对象的时候，Promise的状态为pending；在调用resolve回调函数的时候，Promise的状态为fullfilled，表示成功状态；在调用reject回调函数的时候，Promise的状态为rejected，表示失败状态；</strong></p>
<p>Promise 类有 .then() .catch() 和 .finally() 三个方法，这三个方法的参数都是一个函数，**.then()** 可以将参数中的函数添加到当前 Promise 的正常执行序列，.catch() 则是设定 Promise 的异常处理序列，.finally() 是在 Promise 执行的最后一定会执行的序列。 .then() 传入的函数会按顺序依次执行，有任何异常都会直接跳到 catch 序列。<strong>then()方法指定的回调函数将在当前脚本所有同步任务执行完后才会执行</strong></p>
<p>如果 then 中返回的是一个 Promise 对象，那么<strong>下一个 then</strong> 将相当于对这个返回的 Promise 进行操作</p>
<figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="keyword">let</span> promise = <span class="keyword">new</span> <span class="built_in">Promise</span>(<span class="function">(<span class="params">resolve, reject</span>) =&gt;</span> &#123;</span><br><span class="line">  <span class="built_in">console</span>.log(<span class="number">111</span>);</span><br><span class="line">  <span class="comment">// 执行异步操作</span></span><br><span class="line">  <span class="built_in">setTimeout</span>(<span class="function">() =&gt;</span> &#123;</span><br><span class="line">    <span class="built_in">console</span>.log(<span class="number">222</span>);</span><br><span class="line">    <span class="comment">// 执行异步操作成功,此时修改promise的状态fullfilled</span></span><br><span class="line">    resolve(<span class="string">&quot;success!&quot;</span>);</span><br><span class="line">    <span class="comment">// 执行异步操作成功,此时修改promise的状态rejected</span></span><br><span class="line">    reject(<span class="string">&quot;failed!&quot;</span>);</span><br><span class="line">  &#125;, <span class="number">2000</span>);</span><br><span class="line">&#125;);</span><br><span class="line">promise.then(<span class="function">(<span class="params">data</span>) =&gt;</span> &#123; <span class="comment">// promise的状态fullfilled的操作</span></span><br><span class="line">  <span class="built_in">console</span>.log(<span class="string">&quot;成功&quot;</span>, data);</span><br><span class="line">&#125;, <span class="function">() =&gt;</span> &#123; <span class="comment">// promise的状态rejected的操作</span></span><br><span class="line">  <span class="built_in">console</span>.log(<span class="string">&quot;失败&quot;</span>, data);</span><br><span class="line">&#125;).catch(<span class="function"><span class="keyword">function</span>(<span class="params">err</span>)</span>&#123;</span><br><span class="line">    <span class="built_in">console</span>.log(err);</span><br><span class="line">&#125;);</span><br><span class="line"><span class="comment">//111 222 成功 success</span></span><br></pre></td></tr></table></figure>

<p>一般来说，调用resolve或reject以后，Promise 的使命就完成了，后继操作应该放到then方法里面，而不应该直接写在resolve或reject的后面。<strong>resolve或reject总是在本轮事件循环的末尾执行</strong>，所以最后才打印success。当调用resolve()函数将promise状态改变成fullfilled时，后面的reject()就不会执行</p>
<p><strong>使用 promise 的经验法则</strong></p>
<ol>
<li>使用异步或阻塞代码时，请使用 promise。</li>
<li>为了代码的可读性，resolve 方法对待 then, reject 对应 catch 。</li>
<li>确保同时写入.catch 和 .then 方法来实现所有的 promise。</li>
<li>如果在这两种情况下都需要做一些事情，请使用 .finally。</li>
<li>我们只有一次改变每个promise (单一原则)。</li>
<li>我们可以在一个promise 中添加多个处理程序。</li>
<li>Promise对象中所有方法的返回类型，无论是静态方法还是原型方法，都是Promise。</li>
<li>在Promise.all中，无论哪个promise 首先未完成，promise 的顺序都保持在值变量中。</li>
</ol>
<hr>
<p><strong>重点异步函数</strong>：async 和 await。方便，简洁.但await 指令后必须跟着一个 Promise，异步函数会在这个 Promise 运行中暂停，直到其运行结束再继续运行。</p>
<p>例：</p>
<figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">print</span>(<span class="params">delay, message</span>) </span>&#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="keyword">new</span> <span class="built_in">Promise</span>(<span class="function"><span class="keyword">function</span> (<span class="params">resolve, reject</span>) </span>&#123;</span><br><span class="line">        <span class="built_in">setTimeout</span>(<span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</span><br><span class="line">            <span class="built_in">console</span>.log(message);</span><br><span class="line">            resolve();</span><br><span class="line">        &#125;, delay);</span><br><span class="line">    &#125;);</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">async</span> <span class="function"><span class="keyword">function</span> <span class="title">asyncFunc</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">    <span class="keyword">await</span> print(<span class="number">1000</span>, <span class="string">&quot;First&quot;</span>);</span><br><span class="line">    <span class="keyword">await</span> print(<span class="number">4000</span>, <span class="string">&quot;Second&quot;</span>);</span><br><span class="line">    <span class="keyword">await</span> print(<span class="number">3000</span>, <span class="string">&quot;Third&quot;</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h5 id="4-DOM文档对象模型"><a href="#4-DOM文档对象模型" class="headerlink" title="4.DOM文档对象模型"></a>4.DOM文档对象模型</h5><p>通过 HTML DOM，可访问 JavaScript HTML 文档的所有元素。</p>
<p>改变 <strong>HTML</strong> 元素的属性，请使用这个语法：</p>
<p>document.getElementById(<em>id</em>).<em>attribute=新属性值</em></p>
<hr>
<p>改变 HTML 元素的<strong>样式</strong>，请使用这个语法：</p>
<p>document.getElementById(<em>id</em>).style.<em>property</em>=<em>新样式</em></p>
<hr>
<p>添加<strong>监听</strong>事件。addEventListener() 方法允许向同一个元素添加多个事件，且不会覆盖已存在的事件。不论是同一种类型，还是不同的类型</p>
<p><em>element</em>.addEventListener(<em>event, function, useCapture</em>);</p>
<p>第一个参数是事件的类型 (如 “click” 或 “mousedown”).</p>
<p>第二个参数是事件触发后调用的函数。</p>
<p>第三个参数是个布尔值用于描述事件是冒泡还是捕获。该参数是可选的。</p>
<hr>
<p><strong>冒泡，捕获</strong>定义了事件触发的顺序</p>
<p>在 <em>冒泡</em> 中，<strong>内部</strong>元素的事件会先被触发，然后再触发外部元素</p>
<p>在 <em>捕获</em> 中，<strong>外部</strong>元素的事件会先被触发，然后才会触发内部元素的事件</p>
<h5 id="5-BOM浏览器对象模型"><a href="#5-BOM浏览器对象模型" class="headerlink" title="5.BOM浏览器对象模型"></a>5.BOM浏览器对象模型</h5><p>所有 JavaScript 全局对象、函数以及变量均自动成为 <strong>window 对象</strong>的成员。</p>
<p>window的常用方法：</p>
<ul>
<li>window.innerHeight - 浏览器窗口的内部高度(包括滚动条)</li>
<li>window.innerWidth - 浏览器窗口的内部宽度(包括滚动条)</li>
<li>window.open() - 打开新窗口</li>
<li>window.close() - 关闭当前窗口</li>
<li>window.moveTo() - 移动当前窗口</li>
<li>window.resizeTo() - 调整当前窗口的尺寸</li>
</ul>
<hr>
<p>window.<strong>location</strong> 对象用于获得当前页面的地址 (URL)，并把浏览器重定向到新的页面。使用时可省略window。</p>
<ul>
<li>location.href 属性返回当前页面的 URL。// <a target="_blank" rel="noopener" href="https://www.runoob.com/js/js-window-location.html">https://www.runoob.com/js/js-window-location.html</a></li>
<li>location.pathname 属性返回 URL 的路径名。 // /js/js-window-location.html</li>
<li>location.assign() 方法加载新的文档，打开新的网页。// window.location.assign(“<a target="_blank" rel="noopener" href="https://www.runoob.com&quot;/">https://www.runoob.com&quot;</a>)</li>
</ul>
<hr>
<ul>
<li>history.back() - 与在浏览器点击后退按钮相同</li>
<li>history.forward() - 与在浏览器中点击向前按钮相同</li>
</ul>
<hr>
<p><strong>计时事件</strong></p>
<ul>
<li>setInterval(fucntion,time) - 间隔指定的毫秒数<strong>不停地执行</strong>指定的代码。</li>
<li>setTimeout(function,time) - 在指定的毫秒数后执行指定代码。</li>
<li>clearInterval() 方法用于停止 setInterval() 方法执行的函数代码。</li>
<li>clearTimeout() 方法用于停止执行setTimeout()方法的函数代码。</li>
</ul>
<hr>
<p><strong>cookie</strong></p>
<p>Cookie 的作用就是用于解决 “如何记录客户端的用户信息”.当用户访问 web 页面时，他的名字可以记录在 cookie 中.下一次访问就可以通过cookie读取用户访问记录。</p>
<figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="comment">//创建 cookie 如下所示：</span></span><br><span class="line"><span class="built_in">document</span>.cookie=<span class="string">&quot;username=John Doe&quot;</span>;</span><br><span class="line"><span class="comment">//读取 cookie：</span></span><br><span class="line"><span class="keyword">var</span> x = <span class="built_in">document</span>.cookie;</span><br></pre></td></tr></table></figure>

<h5 id="6-this"><a href="#6-this" class="headerlink" title="6.this"></a>6.this</h5><p>根据函数的调用方式的不同，this会指向不同的对象：【重要】</p>
<ul>
<li>1.以函数的形式调用时，this永远都是window。比如<code>fun();</code>相当于<code>window.fun();</code></li>
<li>2.以方法的形式调用时，this是调用方法的那个对象</li>
<li>3.以构造函数的形式调用时，this是新创建的那个对象</li>
<li>4.使用call和apply调用时，this是指定的那个对象</li>
</ul>
<h5 id="7-原型对象-原型链"><a href="#7-原型对象-原型链" class="headerlink" title="7.原型对象(原型链)"></a>7.原型对象(原型链)</h5><p><a target="_blank" rel="noopener" href="http://www.cpengx.cn/p/357.html">具体细节查看</a></p>
<h6 id="概念"><a href="#概念" class="headerlink" title="概念"></a>概念</h6><p>我们所创建的每一个函数，解析器都会向函数中添加一个属性 prototype。这个属性对应着一个对象，这个对象就是我们所谓的原型对象。每个原型都有一个 constructor 属性指向关联的构造函数 实例原型指向构造函数</p>
<p>当函数以<strong>构造函数</strong>的形式调用时，它所创建的实例对象中都会有一个隐含的属性，指向该构造函数的原型，我们可以通过<strong>proto</strong>来访问该属性</p>
<figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="comment">// 定义构造函数</span></span><br><span class="line"><span class="function"><span class="keyword">function</span> <span class="title">Person</span>(<span class="params"></span>) </span>&#123;&#125;</span><br><span class="line"><span class="keyword">var</span> per1 = <span class="keyword">new</span> Person();</span><br><span class="line"><span class="keyword">var</span> per2 = <span class="keyword">new</span> Person();</span><br><span class="line"><span class="built_in">console</span>.log(Person.prototype); <span class="comment">// 打印结果：[object object]</span></span><br><span class="line"><span class="built_in">console</span>.log(per1.__proto__ == Person.prototype); <span class="comment">//注意后面是构造函数的prototype，前面为实例的__proto__</span></span><br><span class="line"><span class="comment">// 打印结果：true</span></span><br><span class="line"><span class="built_in">console</span>.log(Person === Person.prototype.constructor); <span class="comment">// true</span></span><br></pre></td></tr></table></figure>

<p><code>实例.__proto__</code> 和 <code>构造函数.prototype</code>都指的是原型对象。</p>
<img src="https://upload-images.jianshu.io/upload_images/1490251-e7476a8697e97aab.png?imageMogr2/auto-orient/strip|imageView2/2/w/567/format/webp" alt="图解" style="zoom:80%;" />

<p>原型对象就相当于一个<strong>公共</strong>的区域，所有同一个类的实例都可以访问到这个原型对象，我们可以将对象中共有的内容，统一设置到原型对象中。</p>
<h6 id="原型链"><a href="#原型链" class="headerlink" title="原型链"></a>原型链</h6><p>原型对象也是对象，所以它也有原型，当我们使用或访问一个对象的属性或方法时：</p>
<ul>
<li>它会先在对象自身中寻找，如果有则直接使用；</li>
<li>如果没有则会去原型对象中寻找，如果找到则直接使用；</li>
<li>如果没有则去原型的原型中寻找，直到找到Object对象的原型。</li>
<li>Object对象的原型没有原型，如果在Object原型中依然没有找到，则返回 null</li>
</ul>
<img src="https://upload-images.jianshu.io/upload_images/1490251-3089c135df71c956.png?imageMogr2/auto-orient/strip|imageView2/2/w/604/format/webp" alt="原型链" style="zoom:60%;" /></div></article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">晟松</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://chengsong.info/2020/08/25/js promise prototype复习/">https://chengsong.info/2020/08/25/js promise prototype复习/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://chengsong.info">晟松</a>！</span></div></div><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/js-promise-prototype/">js promise prototype</a></div><nav id="pagination"><div class="prev-post pull-left"><a href="/2020/09/07/yarn%E5%92%8Cnpm/"><i class="fa fa-chevron-left">  </i><span>yarn和npm</span></a></div><div class="next-post pull-right"><a href="/2020/08/24/%E6%AD%A3%E5%88%99%E5%85%A5%E9%97%A8%E7%AC%94%E8%AE%B0/"><span>正则入门笔记</span><i class="fa fa-chevron-right"></i></a></div></nav></div></div><footer class="footer-bg" style="background-image: url(/img/blog-bg.jpg)"><div class="layout" id="footer"><div class="copyright">&copy;2020 - 2023 By 晟松</div><div class="framework-info"><span>驱动 - </span><a target="_blank" rel="noopener" href="http://hexo.io"><span>Hexo</span></a><span class="footer-separator">|</span><span>主题 - </span><a target="_blank" rel="noopener" href="https://github.com/Molunerfinn/hexo-theme-melody"><span>Melody</span></a></div><div class="icp"><a target="_blank" rel="noopener" href="http://www.beian.miit.gov.cn/"><span>湘ICP备2020021729号</span></a></div><div class="busuanzi"><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><span id="busuanzi_container_page_pv"><i class="fa fa-file"></i><span id="busuanzi_value_page_pv"></span><span></span></span></div></div></footer><i class="fa fa-arrow-up" id="go-up" aria-hidden="true"></i><script src="https://cdn.jsdelivr.net/npm/animejs@latest/anime.min.js"></script><script src="https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-animate@latest/velocity.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-ui-pack@latest/velocity.ui.min.js"></script><script src="/js/utils.js?version=1.9.0"></script><script src="/js/fancybox.js?version=1.9.0"></script><script src="/js/sidebar.js?version=1.9.0"></script><script src="/js/copy.js?version=1.9.0"></script><script src="/js/fireworks.js?version=1.9.0"></script><script src="/js/transition.js?version=1.9.0"></script><script src="/js/scroll.js?version=1.9.0"></script><script src="/js/head.js?version=1.9.0"></script><script src="/js/search/local-search.js"></script><script>if(/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) {
  $('#nav').addClass('is-mobile')
  $('footer').addClass('is-mobile')
  $('#top-container').addClass('is-mobile')
}</script><div class="search-dialog" id="local-search"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章"></div></div></div><hr><div id="local-search-results"><div id="local-hits"></div><div id="local-stats"><div class="local-search-stats__hr" id="hr"><span>由</span> <a target="_blank" rel="noopener" href="https://github.com/wzpan/hexo-generator-search" style="color:#49B1F5;">hexo-generator-search</a>
 <span>提供支持</span></div></div></div><span class="search-close-button"><i class="fa fa-times"></i></span></div><div class="search-mask"></div></body></html>